Skip to main content

ToUniversalTime

Type​

handler

Summary​

Convert local time to universal time

Syntax​

ToUniversalTime(<pSeconds>,<pTimeZone>)

Description​

Use the ToUniversalTime function to find the universal time, given the local time for the specified time zone.

Parameters​

NameTypeDescription

pSeconds

The local time

pTimeZone

The time zone, in the form returned by the TimeZones function.

Examples​

local tDateTime
put "2018,2,14,13,38,0,4" into tDateTime
convert tDateTime to seconds
put ToUniversalTime(tDateTime, "Africa/Windhoek") into tDateTime
convert tDateTime to dateitems
-- tDateTime contains "2018,2,14,11,38,0,4"

Value​

NameTypeDescription

return

The universal time

handler: TimeZones

Compatibility and Support​

Platforms

mobile

desktop